var ResourceService = Backbone.Model.extend({
	initialize: function(args, options){
		this.fetch({success:this.process_datasources},{});
	},
	url:function(){
		return "resource/query";
	},
	process_datasources: function(model, response) {
		var template = _.template($("#template-resources").html())({
            resources: response
        });
		$("#datasource_selector").html(template);
		$("#resources").live("change",function(){
			var shopService = new ShopService({},{datasource:this.value}).loadAll();
		});
	}
});